Skip to content

[Feat] BannerCard 컴포넌트 제작#25

Merged
jwj0620gcu merged 19 commits into
mainfrom
23-feat/BannerCard-컴포넌트-구현
Jan 17, 2026

Hidden character warning

The head ref may contain hidden characters: "23-feat/BannerCard-\ucef4\ud3ec\ub10c\ud2b8-\uad6c\ud604"
Merged

[Feat] BannerCard 컴포넌트 제작#25
jwj0620gcu merged 19 commits into
mainfrom
23-feat/BannerCard-컴포넌트-구현

Conversation

@jwj0620gcu

@jwj0620gcu jwj0620gcu commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator

✨ 주요 변경사항

  • BannerCard 컴포넌트 구현

📝 작업 상세 내용

  • BannerCard 컴포넌트 스타일 구현
  • 사용자 UX 고려해 카드만 눌러도 클릭되게 설계
  • 버튼 컴포넌트 재사용

✅ 체크리스트

  • PR 본문에 Close #번호 추가
  • 불필요한 주석, 디버깅 코드 제거
  • 기능 테스트 및 정상 동작 확인
  • 커밋컨벤션 / 코드컨벤션 준수

📸 스크린샷 (선택)

스크린샷 2026-01-15 오후 1 54 01

🔍 기타 참고사항

버튼 클릭 시 이벤트 중복 호출 문제가 있었는데 수정했습니다.


🔗 관련 이슈

@github-actions github-actions Bot added the ✨Feature 새로운 기능 label Jan 15, 2026
@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 포맷 필요
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@KyeongJooni KyeongJooni changed the title [feat]BannerCard 컴포넌트 제작 [Feat] BannerCard 컴포넌트 제작 Jan 15, 2026

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 👍 코멘트 확인해주시면 좋을 것 같아요!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지를 자세히보니 워터마크가 보이는 것 같아요
다른 이미지를 사용해야 할 것 같습니다 피그마에 요청하였으니 추후에 수정 부탁드립니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 보면서 뭐지 했는데 감사합니다.! ㅎ

Comment thread src/shared/ui/BannerCard/BannerCard.tsx Outdated
Comment on lines +32 to +36
<p className={title()}>
중고 전자기기
<br />
구매하기
</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중고 전자기기 구매뿐 아니라 판매 등 역시 같은 컴포넌트를 재사용해야 하기 때문에 하드코딩으로 하는 것보다 props를 받아서 사용하는 건 어떨까요?

type BannerCardProps = {
  title: string;
  description: string;
  buttonText?: string;
  onClick?: () => void;
}

이런식으로 타입 정의를 하여 props로 받아서 사용하면 더 좋을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옙 props로 받아서 사용하는 게 훨씬 나은 것 같아 수정 완료했습니다.!

Comment on lines +16 to +29
<div
data-testid="banner-card"
className={base({ className })}
role="button"
tabIndex={0}
onClick={onClick}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
onClick?.();
}
}}
{...props}
>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

버튼 클릭 시 stopPropagation()으로 부모 이벤트 멈추고, 다시 onClick() 메소드를 호출하고 있는 상황 같은데 바로가기를 눌렀을 때 이동할 것인지 카드 전체를 눌렀을 때 이동할 것인지 고려하고 한쪽은 onClick() 지워주시면 좋을 것 같아요!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

뭔가 카드 클릭, 버튼 클릭하여 이동하는 것을 모두 허용하게 하려 해서 약간 꼬였던 것 같습니다! 감사합니다!

Comment thread src/shared/ui/BannerCard/BannerCard.tsx Outdated
Comment on lines +40 to +47
<Button
size="auto"
className="w-26"
onClick={(e) => {
e.stopPropagation();
onClick?.();
}}
>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분에서 stopPropagation을 하여 막고 있는 것 같습니다!

Comment thread src/shared/ui/BannerCard/BannerCard.tsx Outdated

<Button
size="auto"
className="w-26"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w-26는 속성값이 없다고 나오는데 오타일까요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class w-[104px] can be written as w-26 이렇게 떠서 바꿔봤는데 변경했습니다!

@KyeongJooni KyeongJooni Jan 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정의된 디자인 토큰에 있는 값들은 디자인 토큰 값을 사용하면 좋을 것 같아요!
그리고 현재 Card와 BannerCard 두 컴포넌트에서 tv() + slots만 사용 중인데, variants 없이 tv() 쓰는 건 오버엔지니어링이라고 개인적으로 생각하고 있어요 개인적인 생각이기 때문에 참고만 해주세요! 😄

'flex',
'flex-col',
'items-start',
'gap-[12px]',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.css에 정의되어있습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료 했습니다.!

Comment on lines +27 to +30
'transition-shadow',
'hover:shadow-md',
'focus-visible:ring-2',
'focus-visible:ring-[var(--color-green-700)]',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

피그마 디자인에 명세가 되어있는 속성들일까요? 확인부탁드립니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어디서 나온 친구인지 몰라 삭제 했습니다!

@vercel

vercel Bot commented Jan 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
loopit Ready Ready Preview, Comment Jan 15, 2026 4:18pm

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 측정 불가

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 포맷 필요
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@YeBeenChoi YeBeenChoi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으셨습니다! 👍👍

Comment on lines +81 to +84
'group-hover:w-[307px]',
'group-hover:h-[307px]',
'group-hover:w-[307px]',
'group-hover:h-[307px]',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 중복 선언하신 특별한 이유가 있으신가요?? 없으시다면 정리하는 게 좋을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정하다가 중복으로 들어간 것 같습니다! 당장 수정하겠습니다! 감사합니다!

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!! :)

@YeBeenChoi YeBeenChoi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다~ 고생 많으셨어요!

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@jwj0620gcu
jwj0620gcu merged commit c6a8c33 into main Jan 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] #23 - BannerCard 컴포넌트 제작

3 participants